home *** CD-ROM | disk | FTP | other *** search
/ Robotics & Artificial Int…3 (Professional Edition) / Robotics & Artificial Intelligence Tools 2003 (Professional Edition).iso / computer vision recognition / rcinstall.exe / Disk1 / data1.cab / ASP_Pages / WebHelp / ehlpdht1.js < prev    next >
Encoding:
JavaScript  |  2001-12-12  |  48.7 KB  |  1,759 lines

  1. //// Segment Begin -- (JavaScript 1.0)
  2. // eHelp« Corporation Dynamic HTML JavaScript 
  3. // Copyright⌐ 1998-2000 eHelp« Corporation.All rights reserved.
  4. // Version=4.45
  5. // patch 1
  6.  
  7. // Warning:Do not modify this file.It is generated by RoboHELP« and changes will be overwritten.
  8.  
  9.  
  10. /// Section Begin - General (JavaScript 1.0)
  11.  
  12. //{{HH_SYMBOL_SECTION
  13. var HH_ChmFilename = "";
  14. var HH_WindowName = "";
  15. var HH_GlossaryFont = "";
  16. var HH_Glossary = "";
  17. var HH_Avenue = "";
  18. var HH_ActiveX = false;
  19. //}}HH_SYMBOL_SECTION
  20.  
  21. //Begin to support previous generic parameters
  22. //Get the information about the browser.
  23. var gstrBsAgent     = navigator.userAgent.toLowerCase();
  24. var gnBsVer               = parseInt(navigator.appVersion);
  25.  
  26. var gbBsIE          = (gstrBsAgent.indexOf('msie') != -1);
  27. var gbBsNS          = (gstrBsAgent.indexOf('mozilla') != -1) && ((gstrBsAgent.indexOf('spoofer') == -1) && (gstrBsAgent.indexOf('compatible') == -1));
  28. var gbBsOpera        = (gstrBsAgent.indexOf('opera') != -1);
  29.  
  30. var gbBsIE3Before     = ((gbBsIE) && (gnBsVer <= 2));
  31. var gbBsNS3Before     = ((gbBsNS) && (gnBsVer <= 3));
  32.  
  33. var gbBsNS2            = ((gbBsNS) && (gnBsVer <= 2));
  34. var gbBsNS3            = ((gbBsNS) && (gnBsVer == 3));
  35. var gbBsIE300301    = ((gbBsIE) && (gnBsVer == 2) && ((gstrBsAgent.indexOf("3.00") != -1)||(gstrBsAgent.indexOf("3.0a") != -1)||(gstrBsAgent.indexOf("3.0b")!=-1)||(gstrBsAgent.indexOf("3.01")!=-1)));
  36. var gbBsIE302        = ((gbBsIE) && (gnBsVer == 2) && (gstrBsAgent.indexOf("3.02") != -1));
  37.  
  38. var gbBsNS4            = ((gbBsNS) && (gnBsVer >= 4));
  39. var gbBsNS6            = ((gbBsNS) && (gnBsVer >= 5));
  40.  
  41. var gbBsIE4            = ((gbBsIE) && (gnBsVer >= 4));
  42. var gbBsIE5            = ((gbBsIE) && (gnBsVer >= 5));
  43. var gbBsIE55        = false;
  44.  
  45. gbBsIE = (navigator.appName.indexOf("Microsoft") != -1);
  46. if (parseInt(navigator.appVersion) >= 4) {
  47.  
  48.     gbBsIE4 = (navigator.appName.indexOf("Microsoft") != -1);
  49.  
  50.     if (gbBsIE4) {
  51.         if (gstrBsAgent.indexOf("msie 5.0") != -1) {
  52.             gbBsIE5 = true;
  53.         }
  54.         if (gstrBsAgent.indexOf("msie 5.5") != -1) { // curently IE 5.5 has some buggy stuff. we need do some remedy to our code.
  55.             gbBsIE55 = true;
  56.         }
  57.     }
  58. }
  59.  
  60. var gbBsMac            = (gstrBsAgent.indexOf('mac') != -1);
  61. var gbBsWindows        = ((gstrBsAgent.indexOf('win') != -1) || (gstrBsAgent.indexOf('16bit') != -1));
  62. var gbBsOp3            = (gstrBsAgent.indexOf('opera') != -1);
  63.  
  64. // Utilities functions.
  65. function BsscHasExtJs()
  66. {
  67.     if( gbBsIE3Before || gbBsNS3Before)
  68.         return false;
  69.     return true;
  70. }
  71.  
  72. // Register event handler
  73. var gBsOnLoads             = new Array();    // An array holds all the onload event handler.
  74. var gBsOnClicks         = new Array();    // An array holds all the onClick event handler.
  75. var gBsOnUnLoads         = new Array();    // An array holds all the OnUnLoad event handler.
  76. var gBsOnMouseOvers     = new Array();    // An array holds all the OnMouseOver event handler.
  77. var gBsOnMouseOuts         = new Array();    // An array holds all the OnMouseOut event handler.
  78.  
  79. var gbOrignalOnMouseDown = null;
  80.  
  81. function BsscRegisterOnLoad(funcHandler)
  82. {
  83.     var nLength = gBsOnLoads.length;
  84.     gBsOnLoads[nLength] = funcHandler;
  85. }
  86.  
  87. function BsscRegisterOnClick(funcHandler)
  88. {
  89.     var nLength = gBsOnClicks.length;
  90.     gBsOnClicks[nLength] = funcHandler;
  91. }
  92.  
  93. function BsscRegisterOnUnLoad(funcHandler)
  94. {
  95.     var nLength = gBsOnUnLoads.length;
  96.     gBsOnUnLoads[nLength] = funcHandler;
  97. }
  98.  
  99. function BsscRegisterOnMouseOver(funcHandler)
  100. {
  101.     var nLength = gBsOnMouseOvers.length;
  102.     gBsOnMouseOvers[nLength] = funcHandler;
  103. }
  104.  
  105. function BsscRegisterOnMouseOut(funcHandler)
  106. {
  107.     var nLength = gBsOnMouseOuts.length;
  108.     gBsOnMouseOuts[nLength] = funcHandler;
  109. }
  110.  
  111.  
  112. function BsGeneralOnLoad()
  113. {
  114.     if (!gbBsIE4 && !gbBsNS4)
  115.         return;
  116.  
  117.     // Make everything visible in navigator
  118.     if (gbBsNS4 && !gbBsNS6) {
  119.         // Make some special effects items visible
  120.         for (var iLayer = 0; iLayer < document.layers.length; iLayer++) {
  121.             document.layers[iLayer].visibility = "show";
  122.             document.layers[iLayer].left = 0;
  123.         }
  124.     }
  125. }
  126.  
  127. // If resize the netscape browser, need to reload it.
  128. function BsReDo()
  129. {
  130.   if (innerWidth != origWidth || innerHeight != origHeight)
  131.      location.reload();
  132. }
  133. // End of the local functions.
  134.  
  135. // The following functions are used by the html files.
  136. function BSSCOnLoad()
  137. {
  138.     if( !BsscHasExtJs() )
  139.         return;
  140.     for (var nElement = gBsOnLoads.length - 1; nElement >= 0; nElement--)
  141.         gBsOnLoads[nElement]();
  142. }
  143.  
  144. function BSSCOnClick()
  145. {
  146.     if (!BsscHasExtJs()) return;
  147.         
  148.     for (var nElement = gBsOnClicks.length - 1; nElement >= 0; nElement--)
  149.         gBsOnClicks[nElement]();
  150. }
  151.  
  152. function BSSCOnUnload()
  153. {
  154.     if (!BsscHasExtJs()) return;
  155.     for (var nElement = gBsOnUnLoads.length - 1; nElement >= 0; nElement--)
  156.     {
  157.         gBsOnUnLoads[nElement]();
  158.     }
  159. }
  160.  
  161. function BSSCOnMouseOver()
  162. {
  163.     if (!BsscHasExtJs()) return;
  164.     for (var nElement = gBsOnMouseOvers.length - 1; nElement >= 0; nElement--)
  165.     {
  166.         gBsOnMouseOvers[nElement]();
  167.     }
  168. }
  169.  
  170. function BSSCOnMouseOut()
  171. {
  172.     if (!BsscHasExtJs()) return;
  173.     for (var nElement = gBsOnMouseOuts.length - 1; nElement >= 0; nElement--)
  174.     {
  175.         gBsOnMouseOuts[nElement]();
  176.     }
  177. }
  178. // End of invocation of the event handle functions.
  179.  
  180.  
  181. // Add the GereralOnLoad to the onload array.
  182. if (typeof(BsscRegisterOnLoad) != "undefined")
  183. {
  184.     BsscRegisterOnLoad(BsGeneralOnLoad);
  185. }
  186. if (gbBsNS4) {
  187.     origWidth = innerWidth;
  188.     origHeight = innerHeight;
  189.     onresize = BsReDo;
  190. }
  191. //End to support previous generic parameters
  192.  
  193. //Begin to support previous HHActiveX invoking
  194. function BsHHActivateComponents()
  195. {
  196.     if( HH_ActiveX && (HH_ChmFilename != "") && ((self == top) || (self == top.frames[0])))
  197.     {
  198.         var objBody = document.all.tags("BODY")[0];
  199.         if( typeof(objBody) == "object" )
  200.         {
  201.             objBody.insertAdjacentHTML("beforeEnd", '<OBJECT ID="HHComponentActivator" CLASSID="CLSID:399CB6C4-7312-11D2-B4D9-00105A0422DF" width=0 height=0></OBJECT>');
  202.             if (HHComponentActivator.object)
  203.                 HHComponentActivator.Activate(HH_ChmFilename, HH_WindowName, HH_GlossaryFont, HH_Glossary, HH_Avenue);
  204.         }
  205.     }
  206. }
  207.  
  208. function BsHHActivXOnLoad()
  209. {    
  210.     if( gbBsIE4 )
  211.         BsHHActivateComponents(); 
  212. }
  213.  
  214. if( typeof(BsscRegisterOnLoad) != "undefined" )
  215. {
  216.     BsscRegisterOnLoad(BsHHActivXOnLoad);
  217. }
  218. //End to support previous HHActiveX invoking
  219.  
  220.  
  221. /// Section End - General (JavaScript 1.0)
  222.  
  223. /// Section Begin  - Popup and Related Topic (JavaScript 1.0)
  224.  
  225. //Begin to support previous popup functions
  226. //////////////////////////////////////////////////////////////////////////////////////////////
  227. //
  228. //    Begin DHTML Popup Functions
  229. //
  230. //////////////////////////////////////////////////////////////////////////////////////////////
  231. //variables used to isolate the browser type
  232. var gBsDoc            = null;            
  233. var gBsSty            = null;
  234. var gBsHtm            = null;
  235. var gBsStyVisShow    = null;
  236. var gBsStyVisHide    = null;
  237. var gBsClientWidth    = 640;
  238. var gBsClientHeight = 480;
  239. var gBsBrowser        = null;
  240.  
  241. // here is the varible for judge popup windows size. these parameter is for IE5.0, it may need adjust for others.
  242. var gBRateH_W        = 0.618; // 1.618 Golden cut.
  243. var gBMaxXOfParent    = 0.8; 
  244. var gBMaxYOfParent    = 0.8;
  245. var gBscrollHeight   = 16;
  246. var gBscrollWidth   =  16;
  247. var gBpermitXDelta    = 3;
  248. var gBpermitYDelta    = 3;
  249.  
  250.  
  251. var arrayPopupURL = new Array();
  252. var arrayAbsPopupURL = new Array();
  253.  
  254. var arrayDirty = new Array();
  255.  
  256. function setAbsPopupURL(nIndex, strURL)
  257. {
  258.     arrayAbsPopupURL[nIndex] = strURL;
  259. }
  260.  
  261. function getAbsPopupURL(nIndex)
  262. {
  263.     if (nIndex == -1 || arrayAbsPopupURL.length <= nIndex) return null;
  264.     else 
  265.         return arrayAbsPopupURL[nIndex];
  266. }
  267.  
  268. function getPopupURL(nIndex)
  269. {
  270.     if (nIndex == -1 || arrayPopupURL.length <= nIndex) return null;
  271.     else 
  272.         return arrayPopupURL[nIndex];
  273. }
  274.  
  275. function getPopupID(nIndex)
  276. {
  277.     return gstrPopupID + nIndex;
  278. }
  279.  
  280. function getPopupShadowID(nIndex)
  281. {
  282.     return gstrPopupShadowID + nIndex;
  283. }
  284.  
  285. function getPopupTopicID(nIndex)
  286. {
  287.     return gstrPopupTopicID + nIndex;
  288. }
  289.  
  290. function getPopupIFrameID(nIndex)
  291. {
  292.     return gstrPopupIFrameID + nIndex;
  293. }
  294.  
  295. function getPopupIFrameName(nIndex)
  296. {
  297.     return gstrPopupIFrameName + nIndex;
  298. }
  299.  
  300.  
  301. function getPopupTopicStyle(nIndex)
  302. {
  303.     return eval("document.all['" + getPopupTopicID(nIndex) + "']").style;
  304. }
  305.  
  306. function getPopupShadowStyle(nIndex)
  307. {
  308.     return eval("document.all['" + getPopupShadowID(nIndex) + "']").style;
  309. }
  310.  
  311. function getPopupIFrame(nIndex)
  312. {
  313.  
  314.     return eval("document.frames['" + getPopupIFrameName(nIndex) + "']");
  315. }
  316.  
  317. function getPopupDivStyle(nIndex)
  318. {
  319.     return eval("document.all['" + getPopupID(nIndex) + "']").style;
  320. }
  321.  
  322. function getPopupIFrameStyle(nIndex)
  323. {
  324.     return eval("document.all['" + getPopupIFrameName(nIndex) + "'].style");
  325. }
  326.  
  327.  
  328. function findDiv(strURL)
  329. {
  330.     var i = 0;
  331.     for (i = 0; i < arrayPopupURL.length; i ++ ) {
  332.         if (arrayPopupURL[i] == strURL) {
  333.             return i;
  334.         }
  335.     }
  336.     return -1;
  337. }
  338.  
  339. var gnToken = -1;
  340. function takeToken()
  341. {
  342.     gnToken ++;
  343.     if (gnToken > 10000) gnToken = 0;
  344.     return gnToken;
  345. }
  346.  
  347. function IsValidToken(nToken)
  348. {
  349.     return (gnToken == nToken);
  350. }
  351.  
  352. function addDiv(strURL)
  353. {
  354.     var i = 0; 
  355.     for (i = 0; i < arrayPopupURL.length; i ++) {
  356.         if (arrayPopupURL[i] == null) {
  357.             arrayPopupURL[i] = strURL;
  358.             return i;
  359.         }
  360.     }    
  361.     arrayPopupURL[i] = strURL;
  362.     arrayDirty[i] = true;
  363.     return i;
  364. }
  365.  
  366. function setDirty()
  367. {
  368.     var i = 0;
  369.     for (i = 0; i < arrayPopupURL.length; i ++ )
  370.         arrayDirty[i] = true;
  371. }
  372.  
  373. function IsDirty(nIndex)
  374. {
  375.     if (nIndex == -1)
  376.         return true;
  377.     else 
  378.         if (arrayDirty.length > nIndex) 
  379.             return arrayDirty[nIndex];
  380.         else
  381.             return true;
  382. }
  383.  
  384. function hideAll()
  385. {
  386.     var i = 0; 
  387.     for (i = 0; i < arrayPopupURL.length; i ++ )
  388.         getPopupDivStyle(i).visibility = gBsStyVisHide;
  389. }
  390.  
  391. function getCurrentPopupIFrame()
  392. {
  393.     var i = 0;
  394.     for (i = 0; i < arrayPopupURL.length; i ++)
  395.         if (getPopupDivStyle(i).visibility == gBsStyVisShow)
  396.             return getPopupIFrame(i);
  397.     return null;
  398. }
  399.  
  400. function setClear(nIndex)
  401. {
  402.     if (nIndex != -1)
  403.         arrayDirty[nIndex] = false;
  404. }
  405.  
  406. function _BSSCCreatePopupDiv(strURL)
  407. {
  408.     var nIndex = findDiv(strURL);
  409.     if (nIndex == -1 ) {
  410.         nIndex = addDiv(strURL);
  411.         BsPopup_CreateDiv(nIndex);
  412.     }
  413.     else {
  414.         if (IsDirty(nIndex)) {
  415.             if("object" == typeof(getPopupIFrame(nIndex).document))
  416.                 getPopupIFrame(nIndex).document.location.href = strURL;
  417.         }
  418.     }
  419.     return nIndex;
  420.  
  421. }
  422.  
  423. //the browser information itself
  424. function _BSPSBrowserItself()
  425. {
  426.     var agent  = navigator.userAgent.toLowerCase();
  427.     this.major = parseInt(navigator.appVersion);
  428.     this.minor = parseFloat(navigator.appVersion);
  429.     this.ns    = ((agent.indexOf('mozilla') != -1) && ((agent.indexOf('spoofer') == -1) && (agent.indexOf('compatible') == -1)));
  430.     this.ns2   = ((this.ns) && (this.major == 2));
  431.     this.ns3   = ((this.ns) && (this.major == 3));
  432.     this.ns4   = ((this.ns) && (this.major >= 4));
  433.     this.ns6   = ((this.ns) && (this.major >= 5));
  434.     this.ie       = (agent.indexOf("msie") != -1);
  435.     this.ie3   = ((this.ie) && (this.major == 2));
  436.     this.ie4   = ((this.ie) && (this.major >= 4));
  437.     this.op3   = (agent.indexOf("opera") != -1);
  438.  
  439.     if (this.ns4)
  440.     {
  441.         gBsDoc        = "document";
  442.         gBsSty        = "";
  443.         gBsHtm        = ".document";
  444.         gBsStyVisShow    = "show";
  445.         gBsStyVisHide    = "hide";
  446.  
  447.     }
  448.     else if (this.ie4)
  449.     {
  450.         gBsDoc         = "document.all";
  451.         gBsSty         = ".style";
  452.         gBsHtm         = "";
  453.         gBsStyVisShow    = "visible";
  454.         gBsStyVisHide    = "hidden";
  455.     }
  456. }
  457.  
  458. //Here is the browser type 
  459. function _BSPSGetBrowserInfo()
  460. {
  461.     gBsBrowser    = new _BSPSBrowserItself();
  462. }
  463.  
  464. //Get client size info
  465. function _BSPSGetClientSize()
  466. {
  467.     if (gBsBrowser.ns4)
  468.     {
  469.         gBsClientWidth    = innerWidth;
  470.         gBsClientHeight = innerHeight;
  471.  
  472.     }
  473.     else if (gBsBrowser.ie4)
  474.     {
  475.         gBsClientWidth    = document.body.clientWidth;
  476.         gBsClientHeight = document.body.clientHeight;
  477.     }
  478. }
  479.  
  480.  
  481. var gstrPopupID = 'BSSCPopup';
  482. var gstrPopupShadowID = 'BSSCPopupShadow';
  483. var gstrPopupTopicID = 'BSSCPopupTopic';
  484. var gstrPopupIFrameID = 'BSSCPopupIFrame';
  485. var gstrPopupIFrameName = 'BSSCPopupIFrameName';
  486.  
  487. var gstrPopupSecondWindowName = 'BSSCPopup';
  488.  
  489. var gPopupWindow = null;
  490. var gnPopupClickX = 0;
  491. var gnPopupClickY = 0;
  492.  
  493. var gnPopupScreenClickX = 0;
  494. var gnPopupScreenClickY = 0;
  495.  
  496. var gbPopupTimeoutExpired = false;
  497.  
  498.  
  499. function DHTMLPopupSupport()
  500. {
  501.     if ((gbBsIE4) && (!gbBsMac)) {
  502.         return true;
  503.     }
  504.     return false;
  505. }
  506.  
  507.  
  508.  
  509. function BSSCPopup_IsPopup()
  510. {
  511.     if (DHTMLPopupSupport() && (this.name.indexOf(gstrPopupIFrameName) != -1)) {
  512.         return true;
  513.     } else if ((gbBsNS4 || gbBsIE4) && (this.name.indexOf(gstrPopupID) != -1)) {
  514.         return true;
  515.     } else {
  516.         return false;
  517.     }
  518. }
  519.  
  520.  
  521. // If there is a hyperlink in a popup window, display the hyperlink in
  522. // the original window.
  523. if (BSSCPopup_IsPopup() && !gbBsIE4) {
  524.     document.write("<base target=\"_parent\">");
  525. }
  526.  
  527. // Local functions.
  528. function BsPopup_CreateDiv(nIndex)
  529. {
  530.     if(!DHTMLPopupSupport())
  531.         return;
  532.     // DO NOT SET Width and height for the div, otherwize it will make IE4 popup do not work when view the topic alone.
  533.     var strPopupDiv = "<DIV ID='" + getPopupID(nIndex) + "' STYLE='position:absolute; top:-100; left:0; z-index:600; visibility:hidden;'>";
  534.     strPopupDiv += "<DIV ID='" + getPopupShadowID(nIndex) + "' STYLE=\"position:absolute;top:0; left:0;  background-color:#C0C0C0;\"></DIV>";
  535.     strPopupDiv += "<DIV ID='" + getPopupTopicID(nIndex) + "' STYLE=\"position:absolute;top:0; left:0;  background-color:#FFFFFF;border:1px #000000 outset;\">";
  536.     strPopupDiv += "<IFRAME ID='" + getPopupIFrameID(nIndex) + "' name='" + getPopupIFrameName(nIndex) + "' src = '" + getPopupURL(nIndex) + "' frameborder=0 scrolling=auto></IFRAME>";
  537.     strPopupDiv += "</DIV></DIV>";
  538.  
  539.     var objBody = document.all.tags("BODY")[0];
  540.     if( typeof(objBody) != "object" )
  541.         return;
  542.  
  543.     objBody.insertAdjacentHTML("beforeEnd", strPopupDiv);
  544. }
  545.  
  546. function BSSCPopup_Timeout(nIndex, nToken)
  547. {
  548.     if (!IsValidToken(nToken)) return;
  549.  
  550.     if ((getPopupIFrame(nIndex).document.readyState == "complete") &&
  551.         (getPopupIFrame(nIndex).document.body != null)) {
  552.         window.getPopupDivStyle(nIndex).visibility = gBsStyVisShow;
  553.         setClear(nIndex);
  554.         window.gbPopupTimeoutExpired = true;
  555.  
  556.         BSSCPopup_ChangeTargettoParent(getPopupIFrame(nIndex).document);
  557.         getPopupIFrame(nIndex).document.body.onclick = BSSCPopupClicked;
  558.  
  559.         if (gbOrignalOnMouseDown == null)
  560.             gbOrignalOnMouseDown = document.onmousedown;
  561.  
  562.         document.onmousedown = BSSCPopupParentClicked;
  563.  
  564.     } else {
  565.         setTimeout("BSSCPopup_Timeout(" + nIndex + "," + nToken + ")", 100);
  566.     }
  567. }
  568.  
  569.  
  570. // VH 08/10/00 
  571. // do not change target to parent if the href is using javascript
  572. function BSSCPopup_ChangeTargettoParent(tagsObject)
  573. {
  574.     var collA = tagsObject.all.tags("A");
  575.     BSSCPopup_ChangeTargettoParent2(collA);
  576.  
  577.     var collIMG = tagsObject.all.tags("IMG");
  578.     BSSCPopup_ChangeTargettoParent2(collIMG);
  579. }
  580.  
  581. function BSSCPopup_ChangeTargettoParent2(colls)
  582. {
  583.     var j = 0;
  584.     if (colls != null)  {
  585.         for (j = 0; j < colls.length; j ++ )
  586.         {
  587.             var strtemp = colls[j].href;
  588.             strtemp = strtemp.toLowerCase();
  589.             if (strtemp.indexOf("javascript:") == -1)
  590.                 colls[j].target = "_parent";
  591.         }
  592.  
  593.     }
  594. }
  595.  
  596. function BSPSPopupTopicWinHelp(strURL)
  597. {
  598.     _BSSCPopup(strURL);
  599.     return;
  600. }
  601.  
  602. function _BSSCPopup(strURL, width, height)
  603. {
  604.     var cuswidth = 0;
  605.     var cusheight = 0;
  606.     if ("undefined" != typeof(width) && "undefined" != typeof(height)) {
  607.         cuswidth = width;
  608.         cusheight= height;
  609.     }
  610.     
  611.     if (DHTMLPopupSupport()) {
  612.         // If we are already in a popup, replace the contents
  613.     //    if (BSSCPopup_IsPopup()) {
  614.     //        parent._BSSCPopup(strURL, cuswidth, cusheight);
  615.     //    } else {
  616.             var nToken = takeToken(); // take  token first.
  617.             var nIndex = _BSSCCreatePopupDiv(strURL);
  618.             window.gbPopupTimeoutExpired = false;
  619.             var ntWidth = gBsClientWidth;
  620.             var ntHeight = gBsClientHeight;
  621.             _BSPSGetClientSize();
  622.             if (ntWidth != gBsClientWidth || ntHeight != gBsClientHeight) {
  623.                 setDirty();
  624.             }
  625.  
  626.  
  627.             if (IsDirty(nIndex)) {
  628.                 if (gbBsMac) {
  629.                     setTimeout("BSSCPopup_AfterLoad(" + nIndex + "," + nToken + "," + cuswidth + "," + cusheight  +")", 400);
  630.                 } else {
  631.                     setTimeout("BSSCPopup_AfterLoad(" + nIndex + "," + nToken + "," + cuswidth + "," + cusheight + ")", 100);
  632.                 }
  633.             }
  634.             else {
  635.                 MoveDivAndShow(nIndex ,nToken, cuswidth, cusheight);
  636.             }
  637.     //    }
  638.  
  639.     } else {
  640.         _BSSCPopup2(strURL, cuswidth, cusheight);
  641.     }
  642.     return;
  643. }
  644.  
  645.  
  646. function _BSSCPopup2(strURL, width, height)
  647. {
  648.     if (window.name == gstrPopupSecondWindowName) {
  649.         window.location = strURL;
  650.     } else {
  651.         if (!gbBsMac || !gBsBrowser.ns4) {
  652.             BSSCHidePopupWindow();
  653.         }
  654.         var nX = 0;
  655.         var nY = 0;
  656.         var nHeight = 300;
  657.         var nWidth = 400;
  658.         if (width > 0 && height > 0) {
  659.             nHeight = height;
  660.             nWidth = width;
  661.         }
  662.         _BSPSGetClientSize();
  663.  
  664.         nX = window.gnPopupScreenClickX;
  665.         nY = window.gnPopupScreenClickY;
  666.  
  667.         if (nY + nHeight + 40 > screen.availHeight) {
  668.             nY = screen.availHeight - nHeight - 40;
  669.         }
  670.         if (nX + nWidth + 40 > screen.availWidth) {
  671.             nX = screen.availWidth - nWidth - 40;
  672.         }
  673.         // Launch a separate window
  674.         var strParam = "titlebar=no,toolbar=no,status=no,location=no,menubar=no,resizable=yes,scrollbars=yes";
  675.         if (gBsBrowser.ns) {
  676.             if (gBsBrowser.ns6) {
  677.                 strParam += ",Height=" + nHeight + ",Width=" + nWidth;
  678.                 strParam += ",screenX=" + nX + ",screenY=" + nY;
  679.             }
  680.             else {
  681.                 strParam += ",OuterHeight=" + nHeight + ",OuterWidth=" + nWidth;
  682.                 strParam += ",screenX=" + nX + ",screenY=" + nY;
  683.                 strParam += ",dependent=yes";
  684.             }
  685.         }
  686.         else {
  687.             strParam += ",height=" + nHeight + ",width=" + nWidth;
  688.             strParam += ",left=" + nX + ",top=" + nY;
  689.         }
  690.         window.gPopupWindow = window.open(strURL, gstrPopupSecondWindowName, strParam);
  691.  
  692.         if (gBsBrowser.ns4) {
  693.             window.gPopupWindow.captureEvents(Event.CLICK | Event.BLUE);
  694.             window.gPopupWindow.onclick = NonIEPopup_HandleClick;
  695.             window.gPopupWindow.onblur = NonIEPopup_HandleBlur;
  696.         }
  697.         else if (gBsBrowser.ie4)
  698.         {
  699.             setTimeout("setPopupFocus();", 100);
  700.         }
  701.     }
  702.     return;
  703. }
  704.  
  705. function setPopupFocus()
  706. {
  707.     window.gPopupWindow.focus();
  708. }
  709.  
  710. function NonIEPopup_HandleBlur(e)
  711. {
  712.     window.gPopupWindow.focus();
  713. }
  714.  
  715. function NonIEPopup_HandleClick(e)
  716. {
  717.     // Because navigator will give the event to the handler before the hyperlink, let's
  718.     // first route the event to see if we are clicking on a Popup menu in a popup.
  719.     document.routeEvent(e);
  720.  
  721.     // If a popup menu is active then don't do anything with the click
  722.     if (window.gPopupWindow.gbInPopupMenu) {
  723.         window.gPopupWindow.captureEvents(Event.CLICK);
  724.         window.gPopupWindow.onclick = NonIEPopup_HandleClick;
  725.         return false;
  726.     }
  727.  
  728.     // Close the popup window
  729.     if (e.target.href != null) {
  730.         window.location.href = e.target.href;
  731.         if (e.target.href.indexOf("javascript:void(0)") == -1 && e.target.href.indexOf("javascript:null") == -1 && e.target.href.indexOf("BsscPopup") == -1) {
  732.             this.close();
  733.         }
  734.     } else {
  735.         this.close();
  736.     }
  737.     return false;
  738.  
  739. }
  740.  
  741. function BSSCPopup_AfterLoad(nIndex, nToken, cuswidth, cusheight)
  742. {    
  743.     if (typeof(window.getPopupIFrame(nIndex).document) == "unknown") {
  744.         _BSSCPopup2(getPopupURL(nIndex), cuswidth, cusheight);
  745.         return;
  746.     }
  747.     if (!IsValidToken(nToken)) return;
  748.  
  749.     if ((window.getPopupIFrame(nIndex).document.readyState == "complete") &&
  750.         (window.getPopupIFrame(nIndex).document.body != null)) {
  751.             if (window.getPopupIFrame(nIndex).document.location.href.indexOf("about:blank") != -1) { // add this check. IE will use about:blank" as the default vaule for Iframe.
  752.                 window.getPopupIFrame(nIndex).document.location = getPopupURL(nIndex);
  753.                 setTimeout("BSSCPopup_AfterLoad(" + nIndex + "," + nToken + "," + cuswidth + "," + cusheight + ")", 200);
  754.             }
  755.             else
  756.                 {
  757.                     setAbsPopupURL(nIndex, window.getPopupIFrame(nIndex).document.location.href); // change URL to abs url.
  758.                     BSSCPopup_ResizeAfterLoad(nIndex, nToken, cuswidth, cusheight);
  759.                 }
  760.     } else {
  761.         setTimeout("BSSCPopup_AfterLoad(" + nIndex + "," + nToken + "," + cuswidth + "," + cusheight + ")", 200);
  762.     }
  763. }
  764.  
  765.  
  766. function BSSCPopup_ResizeAfterLoad(nIndex, nToken, cuswidth, cusheight)
  767. {
  768.     if (window.gbPopupTimeoutExpired) return;
  769.  
  770.     if (!IsValidToken(nToken)) return;
  771.  
  772.     getPopupDivStyle(nIndex).visibility = gBsStyVisHide;
  773.  
  774.     // Determine the width and height for the window
  775.     //var size = new BSSCSize(0, 0);
  776.     //BSSCGetContentSize(window.getPopupIFrame(nIndex), size);
  777.     //var nWidth = size.x;
  778.     //var nHeight = size.y;
  779.  
  780.     _BSPSGetClientSize();
  781.     
  782.     var size = new BSSCSize(0, 0);
  783.  
  784.     if (cuswidth <= 0 || cusheight <= 0)
  785.         BSSCGetContentSize(window.getPopupIFrame(nIndex), size);
  786.     else {
  787.         size.x = cuswidth;
  788.         size.y = cusheight;
  789.     }
  790.  
  791.     // Determine the width and height for the window
  792.     var nWidth = size.x;
  793.     var nHeight = size.y;
  794.         
  795.     if (nWidth < 40 || nHeight < 40) return;  // there must be something terribly wrong.
  796.  
  797.     window.getPopupDivStyle(nIndex).pixelWidth = nWidth;
  798.     window.getPopupDivStyle(nIndex).pixelHeight = nHeight;
  799.  
  800.     window.getPopupShadowStyle(nIndex).pixelWidth = nWidth;
  801.     window.getPopupShadowStyle(nIndex).pixelHeight = nHeight;
  802.     window.getPopupTopicStyle(nIndex).pixelWidth = nWidth;
  803.     window.getPopupTopicStyle(nIndex).pixelHeight = nHeight;
  804.     if (gbBsIE55)
  805.     {
  806.         window.getPopupShadowStyle(nIndex).pixelWidth = nWidth + 2;
  807.         window.getPopupShadowStyle(nIndex).pixelHeight = nHeight + 2;
  808.         window.getPopupTopicStyle(nIndex).pixelWidth = nWidth + 2;
  809.         window.getPopupTopicStyle(nIndex).pixelHeight = nHeight + 2;
  810.     }
  811.  
  812.     window.getPopupIFrameStyle(nIndex).pixelWidth = nWidth;
  813.     window.getPopupIFrameStyle(nIndex).pixelHeight = nHeight;
  814.     if (gbBsIE55)
  815.     {
  816.         window.getPopupIFrameStyle(nIndex).top = 0;
  817.         window.getPopupIFrameStyle(nIndex).left = 0;
  818.     }
  819.     
  820.     var strURL = getPopupURL(nIndex);
  821.     if (strURL.indexOf("#") != -1)
  822.         getPopupIFrame(nIndex).location.href = strURL;  // reload again, this will fix the bookmark misunderstand in IE5.
  823.         
  824.     MoveDivAndShow(nIndex, nToken, cuswidth, cusheight);
  825. }
  826.  
  827. function MoveDivAndShow(nIndex, nToken, cuswidth, cusheight)
  828. {
  829.     if (window.getPopupIFrame(nIndex).document.location.href != getAbsPopupURL(nIndex)) { // if redirect, reload again.
  830.             window.getPopupIFrame(nIndex).document.location = getPopupURL(nIndex);
  831.             setTimeout("BSSCPopup_AfterLoad(" + nIndex + "," + nToken + "," + cuswidth + "," + cusheight + ")", 200);
  832.             return;
  833.     }
  834.  
  835.     // Determine the position of the window
  836.     var nClickX = window.gnPopupClickX;
  837.     var nClickY = window.gnPopupClickY;
  838.     var nTop = 0;
  839.     var nLeft = 0;
  840.  
  841.     var nWidth = window.getPopupDivStyle(nIndex).pixelWidth;
  842.     var nHeight = window.getPopupDivStyle(nIndex).pixelHeight;
  843.  
  844.     if (nClickY + nHeight + 20 < gBsClientHeight + document.body.scrollTop) {
  845.         nTop = nClickY + 10;
  846.     } else {
  847.         nTop = (document.body.scrollTop + gBsClientHeight) - nHeight - 20;
  848.     }
  849.     if (nClickX + nWidth < gBsClientWidth + document.body.scrollLeft) {
  850.         nLeft = nClickX;
  851.     } else {
  852.         nLeft = (document.body.scrollLeft + gBsClientWidth) - nWidth - 8;
  853.     }
  854.     
  855.     if (nTop < document.body.scrollTop ) nTop  = document.body.scrollTop + 1;
  856.     if (nLeft< document.body.scrollLeft) nLeft = document.body.scrollLeft + 1;
  857.  
  858.  
  859.     window.getPopupDivStyle(nIndex).left = nLeft;
  860.     window.getPopupDivStyle(nIndex).top = nTop;
  861.  
  862.     // Set the location of the background blocks
  863.     window.getPopupShadowStyle(nIndex).left = 6;
  864.     window.getPopupShadowStyle(nIndex).top = 6;
  865.     if (gbBsIE55)
  866.     {
  867.         window.getPopupShadowStyle(nIndex).left = 4;
  868.         window.getPopupShadowStyle(nIndex).top = 4;
  869.     }
  870.  
  871.     if (gbBsMac) {
  872.         // Total hack on the iMac to get the IFrame to position properly
  873.         window.getPopupIFrameStyle(nIndex).pixelLeft = 100;
  874.         window.getPopupIFrameStyle(nIndex).pixelLeft = 0;
  875.         // Explicitly call BSSCOnLoad because the Mac doesn't seem to do it
  876.         window.getPopupIFrame(nIndex).window.BSSCOnLoad();
  877.     }
  878.  
  879.     BSSCPopup_Timeout(nIndex , nToken );
  880.     
  881.     return;
  882. }
  883.  
  884. function    BSSCSize(x, y)
  885. {
  886.     this.x = x;
  887.     this.y = y;
  888. }
  889.  
  890. function BSSCGetContentSize(thisWindow, size)
  891. {
  892.     if (!((gBsBrowser.ie4) || (gBsBrowser.ns4)))
  893.         return;
  894.  
  895.     if (gbBsMac) {
  896.         size.x = 300;
  897.         size.y = 300;
  898.         return;
  899.     }
  900.  
  901.     // Resize the width until it is wide enough to handle the content
  902.     // The trick is to start wide and determine when the scrollHeight changes
  903.     // because then we know a scrollbar is necessary. We can then go back
  904.     // to the next widest size (for no scrollbar)
  905.  
  906.     var ClientRate = gBsClientHeight / gBsClientWidth;
  907.  
  908.     var GoldenSize = new BSSCSize(0,0);
  909.     GoldenSize.x = gBsClientWidth * gBMaxXOfParent;
  910.     GoldenSize.y = gBsClientHeight *gBMaxYOfParent ;
  911.  
  912.     if (ClientRate > gBRateH_W) {
  913.         GoldenSize.y = GoldenSize.x * gBRateH_W;
  914.     }
  915.     else {
  916.         GoldenSize.x = GoldenSize.y / gBRateH_W;
  917.     }
  918.  
  919.     // Try to using parent specified max x.
  920.     var x = 0;
  921.     var maxgoldx = GoldenSize.x;
  922.     var maxx = gBsClientWidth * gBMaxXOfParent;
  923.     
  924.     // This double resize causes the document to re-render (and we need it to)
  925.     thisWindow.moveTo(10000,10000); // this is used to fix the flash on IE4.
  926.     thisWindow.resizeTo(1, 1);
  927.     thisWindow.resizeTo(1, 1);
  928.     thisWindow.resizeTo(maxgoldx, thisWindow.document.body.scrollHeight + gBscrollHeight);
  929.     thisWindow.resizeTo(maxgoldx, thisWindow.document.body.scrollHeight + gBscrollHeight);
  930.         
  931.     var miny = thisWindow.document.body.scrollHeight + gBscrollHeight;
  932.     
  933.     if (miny > GoldenSize.y) // the popup does not fix in the parent wanted golden area. so try to expand itself as large as it can
  934.     {
  935.         thisWindow.resizeTo(maxx , thisWindow.document.body.scrollHeight + gBscrollHeight);
  936.         thisWindow.resizeTo(maxx , thisWindow.document.body.scrollHeight + gBscrollHeight);
  937.         
  938.         miny =     thisWindow.document.body.scrollHeight + gBscrollHeight;
  939.         maxy = gBsClientHeight * gBMaxYOfParent;
  940.         
  941.         if (miny > maxy) { // the popup must have a scroll, OK let it be.
  942.             miny = maxy;
  943.             size.x = maxx;
  944.             size.y = maxy;
  945.             thisWindow.document.body.scroll = 'yes'; // At this time we do want to show scroll any more. so it will looks better a little.
  946.         }
  947.         else { // popup still can fit in the parent area by someway. now we choose the same h/w rate as parent.
  948.             size.y = miny;
  949.             
  950.             //  downsize from maxx , now I try to using binary divide.
  951.             x = maxx;
  952.             deltax = -maxx/2;
  953.             //j = 0;
  954.             while (true) {
  955.                 x = x + deltax;
  956.                 thisWindow.resizeTo(x, miny);
  957.                 thisWindow.resizeTo(x, miny);
  958.                 diffy = thisWindow.document.body.scrollHeight + gBscrollHeight - x * ClientRate;
  959.                 if (diffy >  gBpermitYDelta ) // it is higher than wanted, so x need to be wide a little bitter
  960.                     deltax = Math.abs(deltax) /2;
  961.                 else if (diffy <  -gBpermitYDelta) // it is shorter than wanted, so x need to be narrow a little bitter
  962.                     deltax = -Math.abs(deltax) /2;
  963.                 else 
  964.                     // the y is close enough to wanted.
  965.                     break;
  966.                 if (Math.abs(deltax) < gBpermitXDelta) // the next change is too slight and it can be ignore.
  967.                     break;
  968.             }
  969.             size.x = thisWindow.document.body.scrollWidth; //+ gBscrollWidth;
  970.             size.y = thisWindow.document.body.scrollHeight;// + gBscrollHeight;    
  971.             thisWindow.document.body.scroll = 'no'; // At this time we do not want to show scroll any more. so it will looks better a little.
  972.             
  973.         // Handle absurd cases just in case IE flakes
  974.     //        if (size.y < 100) {
  975.     //            size.y = 100;
  976.     //        }
  977.         }
  978.     }
  979.     else {
  980.         // VH 08/06/00 . OK there is another case we did not check before.
  981.         if (thisWindow.document.body.scrollWidth > maxgoldx) {
  982.             size.x = maxx; 
  983.             size.y = miny;    
  984.             thisWindow.document.body.scroll = 'yes'; // At this time we do want to show scroll any more. so it will looks better a little.
  985.         }
  986.         else {
  987.             //  downsize from maxgoldx , now I try to using binary divide.
  988.             x = maxgoldx;
  989.             deltax = -maxgoldx/2;
  990.             //i = 0;
  991.             while (true) {
  992.                 x = x + deltax;
  993.                 thisWindow.resizeTo(x, miny);
  994.                 thisWindow.resizeTo(x, miny);
  995.                 diffy = thisWindow.document.body.scrollHeight + gBscrollHeight - x * gBRateH_W;
  996.                 if (diffy >  gBpermitYDelta ) // it is higher than wanted, so x need to be wide a little bitter
  997.                     deltax = Math.abs(deltax) /2;
  998.                 else if (diffy <  -gBpermitYDelta) // it is shorter than wanted, so x need to be narrow a little bitter
  999.                     deltax = -Math.abs(deltax) /2;
  1000.                 else 
  1001.                     // the y is close enough to wanted.
  1002.                     break;
  1003.                 if (Math.abs(deltax) < gBpermitXDelta) // the next change is too slight and it can be ignore.
  1004.                     break;
  1005.                 //i ++;
  1006.                 
  1007.             }
  1008.             size.x = thisWindow.document.body.scrollWidth ;//+ gBscrollWidth;
  1009.             size.y = thisWindow.document.body.scrollHeight ;//+ gBscrollHeight;    
  1010.             thisWindow.document.body.scroll = 'no'; // At this time we do not want to show scroll any more. so it will looks better a little.
  1011.         }
  1012.     }
  1013.     
  1014.     // no reload no scrollbar.
  1015.     //size.x = size.x + 16;     //reserve a width for scrollbar (IE 4.0 only)
  1016.  
  1017.     thisWindow.resizeTo(size.x, size.y);
  1018.     thisWindow.resizeTo(size.x, size.y);
  1019.     return;
  1020. }
  1021.  
  1022.  
  1023.  
  1024. function BSSCPopupParentClicked()
  1025. {
  1026.     if (!window.gbPopupTimeoutExpired) {
  1027.         return false;
  1028.     }
  1029.     
  1030.     document.onmousedown = gbOrignalOnMouseDown;
  1031.  
  1032.     // Simply hide the popup
  1033.     hideAll();
  1034.  
  1035.     window.gbPopupTimeoutExpired = false;
  1036.  
  1037.     return true;
  1038. }
  1039.  
  1040.  
  1041. function BSSCPopupClicked()
  1042. {
  1043.     if (!window.gbPopupTimeoutExpired) {
  1044.         return false;
  1045.     }
  1046.  
  1047.  
  1048.     var popupIFrame = getCurrentPopupIFrame();
  1049.     if (popupIFrame == null) {
  1050.         return true;
  1051.     }
  1052.  
  1053. /*
  1054.     if ("undefined" != typeof(popupIFrame.gbInPopupMenu) &&
  1055.         popupIFrame.gbInPopupMenu) {
  1056.         return true;
  1057.     }*/
  1058.  
  1059.     if (!((popupIFrame.window.event != null) &&
  1060.         (popupIFrame.window.event.srcElement != null) &&
  1061.         ((popupIFrame.window.event.srcElement.tagName == "A") ||
  1062.         (popupIFrame.window.event.srcElement.tagName == "IMG")))) {
  1063.         document.onmousedown = gbOrignalOnMouseDown;
  1064.  
  1065.     // Simply hide the popup
  1066.         hideAll();
  1067.  
  1068.         window.gbPopupTimeoutExpired = false;
  1069.  
  1070.         return true;
  1071.     }
  1072. }
  1073.  
  1074.  
  1075. //trace the mouse over's position for hotspot
  1076. function  BSPSPopupOnMouseOver(event)
  1077. {
  1078.     if (gBsBrowser.ie4) {
  1079.         window.gnPopupClickX = event.clientX + document.body.scrollLeft;
  1080.         window.gnPopupClickY = event.clientY + document.body.scrollTop;
  1081.         window.gnPopupScreenClickX = event.screenX;
  1082.         window.gnPopupScreenClickY = event.screenY;
  1083.     } else if (gBsBrowser.ns4) {
  1084.         window.gnPopupClickX = event.pageX - window.pageXOffset;
  1085.         window.gnPopupClickY = event.pageY - window.pageYOffset;
  1086.         window.gnPopupScreenClickX = event.screenX - window.pageXOffset;
  1087.         window.gnPopupScreenClickY = event.screenY - window.pageYOffset;
  1088.     }
  1089. }
  1090.  
  1091.  
  1092. function BSSCHidePopupWindow()
  1093. {
  1094.     if (window.gPopupWindow != null) {
  1095.         if (gBsBrowser.ns4) {
  1096.             if ((typeof window.gPopupWindow != "undefined") && (!window.gPopupWindow.closed)) {
  1097.                 window.gPopupWindow.close();
  1098.                 window.gPopupWindow = null;
  1099.             }
  1100.         }
  1101.     }
  1102.  
  1103.     return;
  1104. }
  1105.  
  1106. // Add the PopupOnClick to the onclick array.
  1107. if (typeof(BsscRegisterOnClick) != "undefined")
  1108. {
  1109.     BsscRegisterOnClick(BsPopupOnClick);
  1110. }
  1111. //End to support previous popup functions
  1112.  
  1113. //Begin to support previous relative topics
  1114. //If webHelp needs Related Topics DHTMLcode, it's supposed to add it here
  1115. var gbPopupMenuTimeoutExpired = false;
  1116. var gbInPopupMenu = false;
  1117. var gbPopupMenuTopicList = null;
  1118.  
  1119. //////////////////////////////////////////////////////////////////////////////////////////
  1120. //
  1121. // Popup Menu code
  1122. //
  1123. //////////////////////////////////////////////////////////////////////////////////////////
  1124.  
  1125. var g_bIsPopupMenuInit = false;
  1126. function _WritePopupMenuLayer()
  1127. {
  1128.     if (!g_bIsPopupMenuInit)
  1129.         {
  1130.       if (gbBsNS4) {
  1131. //Do not try to write ininle styles for NS!  NS can not handle it and will not stop downloading the html page...
  1132.        if (gbBsNS6)
  1133.         document.write("<DIV ID='PopupMenu' STYLE='position:absolute; left:0px; top:0px; z-index:4; visibility:hidden;'></DIV>");
  1134.        else
  1135.            document.write("<DIV CLASS='WebHelpPopupMenu' ID='PopupMenu'></DIV>");
  1136.       } else{
  1137.       document.write("<DIV ID='PopupMenu' STYLE='position:absolute; left:0px; top:0px; z-index:4; visibility:hidden;'></DIV>");
  1138.       if (gbBsIE4) {
  1139.         document.write("<STYLE TYPE='text/css'>");
  1140.         if (gbBsMac) {
  1141.             document.write(".PopupOver {font-family:'Arial'; color:white; background:navy; font-size:10pt; text-decoration:none;}");
  1142.             document.write(".PopupNotOver {font-family:'Arial'; color:black; background:#c0c0c0; font-size:10pt; text-decoration:none;}");
  1143.         } else {
  1144.             document.write(".PopupOver {font-family:'Arial'; color:white; background:navy; font-size:8pt; text-decoration:none;}");
  1145.             document.write(".PopupNotOver {font-family:'Arial'; color:black; background:#c0c0c0; font-size:8pt; text-decoration:none;}");
  1146.         }
  1147.         document.write("</STYLE>");
  1148.        }
  1149.           }
  1150.       g_bIsPopupMenuInit = true;
  1151.     }
  1152. }
  1153.  
  1154. //Define variable arguments as: strTitle, strUrl
  1155. function MTE() 
  1156. {
  1157.     this.strTitle = MTE.arguments[0];
  1158.     if (MTE.arguments.length > 1)
  1159.         this.strURL = MTE.arguments[1];
  1160.     else
  1161.         this.strURL = this.strTitle;
  1162. }
  1163.  
  1164. // If the topic list is set, it is an array of TopicEntry objects (defined in WebHelp3.js)
  1165. function PopupMenu_SetTopicList(aPopupTopicArray)
  1166. {
  1167.     gbPopupMenuTopicList = aPopupTopicArray;
  1168. }
  1169.  
  1170. //Seek for the bsscright frame 
  1171. function _SeekFrameByName( cRoot, strName )
  1172. {
  1173.     if( cRoot == null )    return null;
  1174.     if( cRoot.frames == null )    return null;
  1175.     if( cRoot.frames[strName] != null )    return cRoot.frames[strName];
  1176.     for (var i=0; i<cRoot.frames.length; i++)
  1177.     {
  1178.         var cObj = _SeekFrameByName( cRoot.frames(i).document, strName );
  1179.         if( cObj != null )        return cObj;
  1180.     };
  1181.     return null;
  1182. }
  1183. function _GetFrameByName( cRoot, strName )
  1184. {
  1185.     if( cRoot == null )    return null;
  1186.     var cRet = _SeekFrameByName(cRoot, strName);
  1187.     if( cRet != null )    return cRet;
  1188.     if (cRoot.parent != cRoot)
  1189.         return _GetFrameByName( cRoot.parent, strName );
  1190.     else
  1191.         return null;
  1192. }
  1193.  
  1194. //var gbOriPopupMenuClick = null;
  1195.  
  1196. function _PopupMenu_Invoke(fn_arguments)
  1197. {
  1198.     // Make sure we have reasonable arguments
  1199.     var argLen = fn_arguments.length;
  1200.     if (argLen < 3) {
  1201.         return false;
  1202.     }
  1203.  
  1204.     // Check to see if we only have one target
  1205.     var strTarget = "";
  1206.     var targetDoc = null;
  1207.     if (fn_arguments[1] == '') {
  1208.         if (BSSCPopup_IsPopup()) {
  1209.             targetDoc = parent;
  1210.             strTarget = "TARGET= _parent";
  1211.         }
  1212.         else
  1213.             targetDoc = window.document;
  1214.     } else {
  1215.         targetDoc = _GetFrameByName( parent, fn_arguments[1] );
  1216.  
  1217.         strTarget = "TARGET='" + fn_arguments[1] + "'";
  1218.     }
  1219.  
  1220.     if ((!gbBsIE4 && !gbBsNS4) || ((gbBsMac) && (gbBsIE4) && (window.event.srcElement.tagName == "AREA"))) {
  1221.     
  1222.         var argLen     = fn_arguments.length;
  1223.  
  1224.         // Create the window that the hyperlinks will go into
  1225.         var nHeight = argLen * 15;
  1226.         var nWidth = 400;
  1227.         var strParam = "titlebar=no,toolbar=no,status=no,location=no,menubar=no,resizable=yes,scrollbars=auto";
  1228.         strParam += ",height=" + nHeight + ",width=200";
  1229.         strParam += ",resizable";
  1230.  
  1231.         // Create a temporary window first to ensure the real popup comes up on top
  1232.         var wndTemp = window.open("", "temp", strParam);
  1233.  
  1234.         // Create the real popup window
  1235.         var wndPopupLinks = window.open("", "popuplinks", strParam);
  1236.  
  1237.         // Close the temporary
  1238.         wndTemp.close();
  1239.  
  1240.         wndPopupLinks.document.open("text/html");
  1241.         wndPopupLinks.document.write("<html><head></head>");
  1242.         wndPopupLinks.document.write("<body onBlur=\'self.focus();\'>");
  1243.         var strParaLine = "";
  1244.         for (var i = 0; i < (argLen - 2) / 2; i++) {
  1245.             strParaLine = "";
  1246.             strParaLine += "<a href=\"javascript:";
  1247.             if (gbBsIE) {
  1248.                 strParaLine += "onBlur=null; ";
  1249.             }
  1250.             strParaLine += "opener.location=\'";
  1251.             strParaLine += fn_arguments[2 * i + 3];
  1252.             strParaLine += "\';close();\"";
  1253.             strParaLine += strTarget;
  1254.  
  1255.             strParaLine += ">";
  1256.             strParaLine += fn_arguments[2 * i + 2];
  1257.             strParaLine += "</a>";
  1258.             strParaLine += "<br>";
  1259.             wndPopupLinks.document.write(strParaLine);
  1260.         }
  1261.         wndPopupLinks.document.write("</body></html>");
  1262.         wndPopupLinks.document.close();
  1263.         window.gbInPopupMenu = true;
  1264.         if (!gbBsIE) {
  1265.             wndPopupLinks.focus();
  1266.         }
  1267.  
  1268.         return false;
  1269.     }
  1270.  
  1271.  
  1272.     if (((argLen < 5) && ((isNaN(fn_arguments[2])) || (gbPopupMenuTopicList == null))) ||
  1273.         ((argLen < 4) && ((!isNaN(fn_arguments[2])) && (gbPopupMenuTopicList != null)))) {
  1274.         // Get the place that we will be putting the topic into
  1275.         var strURL = "";
  1276.         if (isNaN(fn_arguments[2]) ||  (gbPopupMenuTopicList == null)) {
  1277.             strURL = fn_arguments[3];
  1278.         }
  1279.         else     {
  1280.             strURL = gbPopupMenuTopicList[fn_arguments[2]].strURL;
  1281.         }
  1282.  
  1283.         if (targetDoc != null) {
  1284.             targetDoc.location.href = strURL;
  1285.         }
  1286.         else {
  1287.             window.open(strURL);
  1288.         }        
  1289.         window.gbInPopupMenu = true;
  1290.         return false;
  1291.     }
  1292.     
  1293.     var strMenu = "";
  1294.     if (gbBsNS4) {
  1295.         strMenu = '<TABLE BORDER="1" CELLSPACING=0 CELLPADDING=3 BGCOLOR="#c0c0c0">';
  1296.     } else {
  1297.         strMenu = '<TABLE STYLE="border:2px outset white;" CELLSPACING=0';
  1298.         if (gbBsMac) {
  1299.             strMenu += ' CELLPADDING=4';
  1300.         } else {
  1301.             strMenu += ' CELLPADDING=2';
  1302.         }    
  1303.         strMenu += ' BGCOLOR=#c0c0c0>';
  1304.     }
  1305.     // Add each of the items
  1306.     var i = 2;
  1307.     while (i <= argLen - 1) {
  1308.         strMenu += '<TR><TD><NOBR>'
  1309.         // If the destination is a number then look it up in the topic list
  1310.         if (isNaN(fn_arguments[i]) ||  (gbPopupMenuTopicList == null)) {
  1311.             strMenu += '<DIV STYLE="padding-left:3pt; padding-right:3pt;"><A HREF="' + fn_arguments[i + 1] + '"' + strTarget;
  1312.         } else {
  1313.             strMenu += '<DIV STYLE="padding-left:3pt; padding-right:3pt;"><A HREF="' + gbPopupMenuTopicList[fn_arguments[i]].strURL + '"' + strTarget;
  1314.         }
  1315.         strMenu += ' onclick="PopupMenu_HandleClick(event);"';
  1316.         strMenu += ' onmouseover="PopupMenu_Over(event);"';
  1317.         strMenu += ' onmouseout="PopupMenu_Out(event);"';
  1318.         strMenu += '>';
  1319.         if (isNaN(fn_arguments[i]) || (gbPopupMenuTopicList == null)) {
  1320.             strMenu += '<SPAN CLASS="PopupNotOver">' + fn_arguments[i] + '</SPAN>';
  1321.         } else {
  1322.             strMenu += '<SPAN CLASS="PopupNotOver">' + gbPopupMenuTopicList[fn_arguments[i]].strTitle + '</SPAN>';
  1323.         }
  1324.         strMenu += '</A></DIV></NOBR></TD></TR>';
  1325.  
  1326.         if (isNaN(fn_arguments[i]) || (gbPopupMenuTopicList == null)) {
  1327.             i += 2;
  1328.         } else {
  1329.             i += 1;
  1330.         }
  1331.     }
  1332.     strMenu += "</TABLE>";
  1333.  
  1334.     if (gbBsMac) {
  1335.     // totally hack. because ie5 in mac need something. </TABLE> is one of them. mac is mad.
  1336.         strMenu +="<TABLE></TABLE>";
  1337.     }
  1338.  
  1339.     var layerPopup = null;
  1340.     var stylePopup = null;
  1341.     var nEventX = 0;
  1342.     var nEventY = 0;
  1343.     var nWindowWidth = 0;
  1344.     if (gbBsIE4) {
  1345.  
  1346.         layerPopup = document.all["PopupMenu"];
  1347.         layerPopup.innerHTML = strMenu;
  1348.         stylePopup = layerPopup.style;
  1349.  
  1350.         _BSPSGetClientSize();
  1351.  
  1352.         // Get the position of the item causing the event (relative to its parent)
  1353.         nEventX = window.event.clientX;
  1354.         nEventY = window.event.clientY;
  1355.  
  1356.         if (nEventY + layerPopup.scrollHeight + 10 < gBsClientHeight) {
  1357.             nEventY += document.body.scrollTop + 10;
  1358.         } else {
  1359.             nEventY = (document.body.scrollTop + gBsClientHeight) - layerPopup.scrollHeight - 20;
  1360.         }
  1361.         stylePopup.top = nEventY;
  1362.         
  1363.         var nPopupWidth = layerPopup.scrollWidth;
  1364.         if (gbBsMac) {
  1365.             nPopupWidth = 80; // we have no idea how to get the dynamic width of the popup.
  1366.         }
  1367.         if (nEventX + nPopupWidth + 20 > gBsClientWidth) {
  1368.             if (gBsClientWidth - nPopupWidth < 5) {
  1369.                 stylePopup.left = 5;
  1370.             } else {
  1371.                 stylePopup.left = gBsClientWidth - nPopupWidth - 5;
  1372.             }
  1373.         } else {
  1374.             stylePopup.left = nEventX + document.body.scrollLeft + 20;
  1375.         }
  1376.  
  1377.         stylePopup.visibility = "visible";
  1378.         document.onclick = PopupMenu_HandleClick;
  1379.  
  1380.     } else if (gbBsNS6) {
  1381.         layerPopup = document.getElementById("PopupMenu");
  1382.         layerPopup.style.visibility = "hidden";
  1383.     
  1384.         var e = fn_arguments[0];
  1385.         nEventX = e.pageX;
  1386.         nEventY = e.pageY;
  1387.         _BSPSGetClientSize();
  1388.         layerPopup.innerHTML = strMenu;
  1389.  
  1390.         if (nEventY + layerPopup.offsetHeight + 20  <  window.pageYOffset + gBsClientHeight) {
  1391.             nEventY += 20;
  1392.         } else {
  1393.             nEventY = gBsClientHeight + window.pageYOffset - layerPopup.offsetHeight - 20;
  1394.         }
  1395.  
  1396.         if (nEventX + layerPopup.offsetWidth + 20 > gBsClientWidth + window.pageXOffset) {
  1397.             if (gBsClientWidth + window.pageXOffset - layerPopup.offsetWidth < 20) {
  1398.                 nEventX = 5;
  1399.             } else {
  1400.                 nEventX = gBsClientWidth + window.pageXOffset - layerPopup.offsetWidth - 20;
  1401.             }
  1402.         } else {
  1403.             nEventX += 20;
  1404.         }
  1405.         layerPopup.style.top = nEventY;
  1406.         layerPopup.style.left = nEventX;
  1407.         // set again to avoid the stupid frash in netscape 6.
  1408.         layerPopup.innerHTML = strMenu;
  1409.         layerPopup.style.visibility = "visible";
  1410.         //window.captureEvents(Event.MOUSEDOWN);
  1411.         window.onclick = PopupMenu_HandleClick;
  1412.     }
  1413.     else if (gbBsNS4) {
  1414.         layerPopup = document.layers.PopupMenu;
  1415.         layerPopup.visibility = "hide";
  1416.         stylePopup = layerPopup.document;
  1417.         stylePopup.write(strMenu);
  1418.         stylePopup.close();
  1419.         var e = fn_arguments[0];
  1420.         nEventX = e.pageX;
  1421.         nEventY = e.pageY;
  1422.         _BSPSGetClientSize();
  1423.         if (nEventY + layerPopup.clip.height + 20 < window.pageYOffset + gBsClientHeight) {
  1424.             nEventY += 20;
  1425.         } else {
  1426.             nEventY = gBsClientHeight + window.pageYOffset- layerPopup.clip.height - 20;
  1427.         }
  1428.         layerPopup.top = nEventY;
  1429.  
  1430.         if (nEventX + layerPopup.clip.width + 20 > gBsClientWidth + window.pageXOffset) {
  1431.             if (gBsClientWidth + window.pageXOffset - layerPopup.clip.width < 20) {
  1432.                 nEventX = 5;
  1433.             } else {
  1434.                 nEventX = gBsClientWidth + window.pageXOffset - layerPopup.clip.width - 20;
  1435.             }
  1436.         } else {
  1437.             nEventX += 20;
  1438.         }
  1439.  
  1440.         layerPopup.left = nEventX;
  1441.  
  1442.         layerPopup.visibility = "show";
  1443.  
  1444. //        window.captureEvents(Event.CLICK | Event.MOUSEDOWN);
  1445.         window.captureEvents(Event.MOUSEDOWN);
  1446. //        window.onclick = PopupMenu_HandleClick;
  1447.         window.onmousedown = PopupMenu_HandleClick;
  1448.     }
  1449.  
  1450.     window.gbInPopupMenu = true;
  1451.     window.gbPopupMenuTimeoutExpired = false;
  1452.     setTimeout("PopupMenu_Timeout();", 100);
  1453.     return false;
  1454. }
  1455.  
  1456.  
  1457. function PopupMenu_Timeout()
  1458. {
  1459.     window.gbPopupMenuTimeoutExpired = true;
  1460. }
  1461.  
  1462. function PopupMenu_Over(e)
  1463. {
  1464.     if (gbBsIE4) {
  1465.         e.srcElement.className = "PopupOver";
  1466.     } else if (gbBsNS4) {
  1467. //        this.bgColor = "red";
  1468. //        e.target.document.className = "PopupOver";
  1469.     }
  1470.     return;
  1471. }
  1472.  
  1473. function PopupMenu_Out(e)
  1474. {
  1475.     if (gbBsIE4) {
  1476.         e.srcElement.className = "PopupNotOver";
  1477.     } else if (gbBsNS4) {
  1478.         this.bgColor = "#f0f0f0";
  1479.     }
  1480.     return;
  1481. }
  1482.  
  1483.  
  1484. function PopupMenu_HandleClick(e)
  1485. {
  1486.     if (!window.gbPopupMenuTimeoutExpired) {
  1487.         return;
  1488.     }
  1489.  
  1490.     window.gbInPopupMenu = false;
  1491.  
  1492.     if (gbBsNS4 && !gbBsNS6) {
  1493. //        window.releaseEvents(Event.CLICK);
  1494.         window.releaseEvents(Event.MOUSEDOWN);
  1495.     }
  1496.  
  1497.     var layerPopup = null;
  1498.     var stylePopup = null;
  1499.     if (gbBsIE4) {
  1500.         layerPopup = document.all["PopupMenu"];
  1501.         stylePopup = layerPopup.style;
  1502.         stylePopup.visibility = "hidden";
  1503.     } else if (gbBsNS6) {
  1504.         layerPopup = document.getElementById("PopupMenu");
  1505.         layerPopup.style.visibility = "hidden";
  1506.     } else if (gbBsNS4) {
  1507.         layerPopup = document.layers.PopupMenu;
  1508.         layerPopup.visibility = "hide";
  1509.     }
  1510.  
  1511. //    if (gbOriPopupMenuClick!= null)
  1512. //        document.onclick = gbOriPopupMenuClick;
  1513.  
  1514.     return;
  1515. }
  1516.  
  1517. // This function should be deleted when all old projects are cleaned up
  1518. function BSPSWritePopupFrameForIE4()
  1519. {
  1520.     return false;
  1521. }
  1522.  
  1523. /////////////////////////////////////////////////////////////////////
  1524. function BSSCPopup_ClickMac()
  1525. {
  1526.     if ((!DHTMLPopupSupport()) && (gbBsIE4))
  1527.     {    
  1528.         var bClickOnAnchor = false;
  1529.         var el;
  1530.         if ((window.event != null) &&
  1531.             (window.event.srcElement != null))
  1532.         {
  1533.             el = window.event.srcElement;
  1534.             while (el != null)
  1535.             {
  1536.                 if ((el.tagName == "A") || (el.tagName == "AREA"))     {
  1537.                     bClickOnAnchor = true;
  1538.                     break;
  1539.                 }
  1540.                 if (el.tagName == "BODY") {
  1541.                     break;
  1542.                 }
  1543.                 el = el.parentElement;
  1544.             }
  1545.         }
  1546.         if (BSSCPopup_IsPopup())
  1547.         {
  1548.             if (!bClickOnAnchor) {
  1549.                 parent.window.gPopupWindow = null;
  1550.                 self.close();
  1551.             }
  1552.         }
  1553.         else
  1554.         {
  1555.             bClosePopupWindow = true;
  1556.             if ((bClickOnAnchor) &&
  1557.                 (el.href) &&
  1558.                 ((el.href.indexOf("javascript:BSSCPopup") != -1) || (el.href.indexOf("javascript:null") != -1) || (el.href.indexOf("javascript:void(0)") != -1)))
  1559.             {
  1560.                 bClosePopupWindow = false;
  1561.             }
  1562.             if (bClosePopupWindow)
  1563.             {
  1564.                 if (window.gPopupWindow != null && !window.gPopupWindow.closed )
  1565.                 {
  1566.                     window.gPopupWindow.close();
  1567.                 }
  1568.             }
  1569.         }
  1570.     }
  1571.  }
  1572.  
  1573. //////////////////////////////////////////////////////////////////////
  1574.  
  1575. _BSPSGetBrowserInfo();
  1576.  
  1577.  
  1578. function BsPopupOnClick()
  1579. {
  1580.     if (!gbBsIE4)
  1581.         return;
  1582.  
  1583.     BSSCPopup_ClickMac();
  1584. }
  1585.  
  1586. function _BSSCOnError(message)
  1587. {
  1588.     if(-1 != message.indexOf("denied") 
  1589.         || -1 != message.indexOf("Object required"))
  1590.      return true;
  1591. }
  1592.  
  1593. //End to support previous relative topics
  1594.  
  1595. /// Section End  - Popup and Related Topic (JavaScript 1.0)
  1596.  
  1597. /// Section Begin - Embedded Stub (JavaScript 1.0)
  1598.  
  1599. var s_strAgent = navigator.userAgent.toLowerCase();
  1600. var s_nVer       = parseInt(navigator.appVersion);
  1601.  
  1602. var s_bIE  = (s_strAgent.indexOf('msie') != -1);
  1603. var s_bNS  = (s_strAgent.indexOf('mozilla') != -1) && ((s_strAgent.indexOf('spoofer') == -1) && (s_strAgent.indexOf('compatible') == -1));
  1604. var s_bOpera    = (s_strAgent.indexOf('opera') != -1);
  1605.  
  1606. var s_bIE3Before = ((s_bIE) && (s_nVer <= 2));
  1607. var s_bNS3Before = ((s_bNS) && (s_nVer <= 3));
  1608.  
  1609. var s_bNS2        = ((s_bNS) && (s_nVer <= 2));
  1610. var s_bNS3        = ((s_bNS) && (s_nVer == 3));
  1611. var s_bIE300301    = ((s_bIE) && (s_nVer == 2) && ((s_strAgent.indexOf("3.00") != -1)||(s_strAgent.indexOf("3.0a") != -1)||(s_strAgent.indexOf("3.0b")!=-1)||(s_strAgent.indexOf("3.01")!=-1)));
  1612. var s_bIE302    = ((s_bIE) && (s_nVer == 2) && (s_strAgent.indexOf("3.02") != -1));
  1613.  
  1614.  
  1615. function HasExtJs()
  1616. {
  1617.     if (s_bIE3Before) { return false;}
  1618.     if (s_bNS3Before) {    return false;}
  1619.     if (typeof (BsGeneralOnLoad) == "undefined"){ return false; }
  1620.     return true;
  1621. }
  1622.  
  1623.  
  1624. function BSSCCreatePopupDiv()
  1625. {
  1626.     return;
  1627. }
  1628.  
  1629.  
  1630. function WritePopupMenuLayer()
  1631. {
  1632.     if (HasExtJs()) {_WritePopupMenuLayer();}
  1633. }
  1634.  
  1635. function BSSCPopup(strURL, width, height)
  1636. {
  1637.     if (HasExtJs())    { 
  1638.         _BSSCPopup(strURL, width, height);
  1639.     }else{
  1640.         //Create a temporary window first to ensure the real popup comes up on top
  1641.         var wndTemp = null;
  1642.         if (!s_bNS3) {
  1643.             wndTemp = window.open("", "temp", "titlebar=no,toolbar=no,status=no,location=no,menubar=no,resizable=yes,scrollbars=yes,height=3,width=4");
  1644.         }
  1645.         // Create the real popup window
  1646.         var wndPopup = window.open(strURL, "BSSCPopup", "titlebar=no,toolbar=no,status=no,location=no,menubar=no,resizable=yes,scrollbars=yes,height=300,width=400");
  1647.         // Close the temporary
  1648.         if (!s_bNS3) {
  1649.             wndTemp.close();
  1650.         } else {
  1651.             wndPopup.focus();
  1652.         }
  1653.     }
  1654. }
  1655.  
  1656. var gbWndTemp = null, gbWndPopupLinks = null;
  1657. var gbstrParaTotal = "";
  1658.  
  1659. function PopupMenu_Invoke()
  1660. {
  1661.     if (HasExtJs()) {
  1662.         return _PopupMenu_Invoke(PopupMenu_Invoke.arguments);
  1663.     }
  1664.     if (s_bNS3Before || s_bIE3Before )    {
  1665.         var argLen     = PopupMenu_Invoke.arguments.length;
  1666.         if (argLen < 5) {
  1667.             window.document.location.href = PopupMenu_Invoke.arguments[3];
  1668.             return false;
  1669.         }
  1670.         gbWndTemp = null;
  1671.         gbWndPopupLinks = null;
  1672.         gbstrParaTotal = "";
  1673.         for (var i = 0; i < (argLen - 2) / 2; i++) {
  1674.             var strParaLine = "";
  1675.             if (s_bNS2 || s_bOpera){
  1676.                 strParaLine += "<a href=\"";
  1677.                 strParaLine += PopupMenu_Invoke.arguments[2 * i + 3];
  1678.                 strParaLine += "\">"
  1679.                 strParaLine += PopupMenu_Invoke.arguments[2 * i + 2];
  1680.                 strParaLine += "</a>";
  1681.             } else {
  1682.                 strParaLine += "<a href=\"javascript:";
  1683.                 strParaLine += "gotoUrl(\'";
  1684.                 strParaLine += PopupMenu_Invoke.arguments[2 * i + 3];
  1685.                 strParaLine += "\');\"";
  1686.                 if (PopupMenu_Invoke.arguments[1] != '') {
  1687.                     strParaLine += " TARGET='" + PopupMenu_Invoke.arguments[1] + "'";
  1688.                 }
  1689.                 strParaLine += ">";
  1690.                 strParaLine += PopupMenu_Invoke.arguments[2 * i + 2];
  1691.                 strParaLine += "</a>";
  1692.             }
  1693.             strParaLine += "<br>";
  1694.             gbstrParaTotal += strParaLine;
  1695.         }
  1696.         var nHeight = argLen * 15;
  1697.         var nWidth = 400;
  1698.         var strParam = "titlebar=no,toolbar=no,status=no,location=no,menubar=no,resizable=yes,scrollbars=auto";
  1699.         strParam += ",height=" + nHeight + ",width=200,resizable";
  1700.         
  1701.         //Create a temporary window first to ensure the real popup comes up on top
  1702.         //var wndTemp = null;
  1703.         if (!s_bNS3) {
  1704.             gbWndTemp = window.open("", "temp", "titlebar=no,toolbar=no,status=no,location=no,menubar=no,resizable=yes,scrollbars=yes,height=3,width=4");
  1705.         } 
  1706.         gbWndPopupLinks = window.open("", "popuplinks", strParam);
  1707.  
  1708.         setTimeout("Wait_PopupMenuReady()", 100);
  1709.     }
  1710.     return true;
  1711. }
  1712.  
  1713. function Wait_PopupMenuReady() 
  1714. {
  1715.     if (gbWndPopupLinks != null && "object" == typeof(gbWndPopupLinks.document)) {
  1716.         PopupMenu_InvokeReady();
  1717.     }
  1718.     else 
  1719.         setTimeout("Wait_PopupMenuReady()", 100);
  1720. }
  1721.  
  1722.  
  1723. function PopupMenu_InvokeReady()
  1724. {
  1725.     if (gbWndPopupLinks != null) {
  1726.         gbWndPopupLinks.document.open("text/html");
  1727.         gbWndPopupLinks.document.write("<html><head>");
  1728.         if (s_bNS2 || s_bOpera) {
  1729.             gbWndPopupLinks.document.write("<base href=\"" + location +"\">");
  1730.         } else {
  1731.             //YJ: IE301,302 and NS3.x works fine
  1732.             gbWndPopupLinks.document.write("<");
  1733.             gbWndPopupLinks.document.write("script>");
  1734.             gbWndPopupLinks.document.write("function gotoUrl(aUrl) {opener.window.location=aUrl; close();}");
  1735.             gbWndPopupLinks.document.write("<");
  1736.             gbWndPopupLinks.document.write("/script>");
  1737.         }
  1738.         gbWndPopupLinks.document.write("</head><body onBlur=\'self.focus();\'>");
  1739.         gbWndPopupLinks.document.write(gbstrParaTotal);
  1740.         gbWndPopupLinks.document.write("</body></html>");
  1741.         gbWndPopupLinks.document.close();
  1742.  
  1743.         // Close the temporary
  1744.         if (!s_bNS3 && gbWndTemp != null) {
  1745.             gbWndTemp.close();
  1746.         }else {
  1747.             gbWndPopupLinks.focus();
  1748.         }
  1749.  
  1750.         return true;
  1751.     }
  1752.     return false;
  1753. }
  1754.  
  1755. /// Section End - Embedded Stub (JavaScript 1.0)
  1756.  
  1757. //// Segment End -- (JavaScript 1.0)
  1758.  
  1759.